class misc::keyboard {
  case $keyboard_layout {
    'us': {
      $keyboard_layout_file = 'keyboard_us'
    }
    default: {
      $keyboard_layout_file = 'keyboard_ch'
    }
  }

  file {
    '/etc/default/keyboard':
      owner => root,
      group => root,
      mode => '644',
      source => "puppet:///modules/${module_name}/$keyboard_layout_file";
  }
}
